/**
 * 
 */
package com.jm.web;

import com.jm.utils.StringBuilderEx;

/**
 * @author yanjie
 * Jan 3, 2012 4:59:08 PM
 */
public class LoadingPage extends BaseDAPage{
	@Override
	protected void OnLoad() {
		StringBuilderEx sb = new StringBuilderEx();
		sb.Append("$P.setDefaultAction('save');");
		this.RegisterOnReadyScript(SCRIPTRUN_REALTIME, sb.toString());
		
		//設置表格頁面默認有哪些按鈕默認啟用
		//this.getBtnDisabledConfig().put("save", false);
		
		//設置默認的焦點
		sb.Reset();
		sb.Append("$P.form.setfocus(true)");
		this.RegisterOnReadyScript(SCRIPTRUN_ONREADY, sb.toString());
		
		super.OnLoad();
	};
	
	@Override
	public String outputHiddenItem() {
		StringBuilderEx sb = new StringBuilderEx();
		sb.Append(super.outputHiddenItem());
		sb.Append("\r\n<input type=\"hidden\" id=\"pagetype\" name=\"pagetype\" value=\"loading\" />");
		return sb.toString();
	}
}
